<template>
	<view class="integral">
		<view class="integral-wrap">
			<van-cell-group class="integral-bg">
			  <van-field
				clearable
				:value="integral"
				type="number"
				input-class="integral-input"
				placeholder="请输入积分数量"
				@change="onChange"
			  />
			</van-cell-group>
			<view class="integral-info">
				<text class="integral-info-txt">积分余额 {{balances}}</text>
				<text class="integral-info-btn" @click="onAllTransfer">全部转账</text>
			</view>
			<van-cell-group>
				<van-field
					label="备注"
					clearable
					placeholder="备注(选填)"
				/>
			</van-cell-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				integral: '',
				balances: 50
			}
		},
		onLoad() {

		},
		methods: {
			onChange () {},
			onClick () {
			
			},
			onAllTransfer () {
				this.integral = this.balances
			}
		}
	}
</script>

<style scoped lang="scss">
	.integral {
		&-wrap {
			padding: 40upx 30upx;
			background-color: #fff;
		}
		&-input {
			height: 50px!important;
			background-color: #9b9b9b!important;
		}
		&-ewm{
			display: flex;
			align-items: center;
			&-l {
				flex: 1;
			}
			&-r {
				width: 140upx;
			}
		}
		&-info {
			display: flex;
			justify-content: space-between;
			padding: 20upx 10upx;
			text {
				display: block;
			}
			&-txt {
				color: #9b9b9b;
			}
			&-btn {
				font-size: 28upx;
				color: #0079f3;
			}
		}
	}
</style>
